Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves issue #821 #1408

Merged
merged 2 commits into from
Dec 20, 2016
Merged

Resolves issue #821 #1408

merged 2 commits into from
Dec 20, 2016

Conversation

briansandall
Copy link
Contributor

This commit fixes issues with sorting by price, but does not address category sorting preferences being ignored (I'm not sure where those settings can be found).

Changing search order via the select menu functions correctly (tested name and price, both ASC and DESC) except that the default sort for the initial search appears to be by relevance while the dropdown menu shows 'Name (A-Z)' as the currently selected method. This means that the initial search results appear to be mis-ordered, but it is merely a mis-display of the selected option.

Keying off of G.product_id is more correct as it only uses the group pricing if the group itself exists, whereas G.sale_price can be null both when the group doesn't exist and when the group doesn't have a sale price.

Furthermore, sale_price can have a value of either null or 0.00, both of which should be considered non-values for purposes of sorting by price.

This commit fixes issues with sorting by price, but does not address category sorting preferences being ignored (I'm not sure where those settings can be found).

Changing search order via the select menu functions correctly (tested name and price, both ASC and DESC) except that the default sort for the initial search appears to be by relevance while the dropdown menu shows 'Name (A-Z)' as the currently selected method. This means that the initial search results appear to be mis-ordered, but it is merely a mis-display of the selected option.

Keying off of `G.product_id` is more correct as it only uses the group pricing if the group itself exists, whereas `G.sale_price` can be null both when the group doesn't exist and when the group doesn't have a sale price.

Furthermore, `sale_price` can have a value of either `null` or `0.00`, both of which should be considered non-values for purposes of sorting by price.
Store settings for sort order now used as the default except when listing
search results, in which case 'Relevance' is always used as the default.
This fact now displays properly in the 'Sort by' dropdown menu.
@briansandall briansandall changed the title Partially resolves issue #821 Resolves issue #821 Dec 19, 2016
@abrookbanks abrookbanks self-assigned this Dec 20, 2016
@abrookbanks abrookbanks added this to the 6.1.2 milestone Dec 20, 2016
@abrookbanks abrookbanks merged commit 8627c6a into cubecart:master Dec 20, 2016
@abrookbanks
Copy link
Member

Works well from my testing. Thank you.

@briansandall briansandall deleted the issue821 branch December 20, 2016 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants